package com.fire.control.system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "t_system_log") 
public class SystemLog extends BaseEntity{

	private static final long serialVersionUID = 1L;
	
	@Column(name = "monitor_target_id", nullable = false,length=36)
	private String monitorTargetId;
	
	/*@Column(name = "monitor_time", nullable = false,length=20)
	@Temporal(TemporalType.DATE)
	private Date monitorTime;*/
	
	@Column(name = "monitor_method", nullable = false,length=50)
	private String monitorMethod;
	
	@Column(name = "monitor_context", nullable = false)
	private String monitorContext;
	
	@ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name="resource_id")
	private Resource Resource;
	
	@Transient
	private String resourceId;
	
	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public String getMonitorTargetId() {
		return monitorTargetId;
	}

	public void setMonitorTargetId(String monitorTargetId) {
		this.monitorTargetId = monitorTargetId;
	}

/*	public Date getMonitorTime() {
		return monitorTime;
	}

	public void setMonitorTime(Date monitorTime) {
		this.monitorTime = monitorTime;
	}*/

	public String getMonitorMethod() {
		return monitorMethod;
	}

	public void setMonitorMethod(String monitorMethod) {
		this.monitorMethod = monitorMethod;
	}

	public String getMonitorContext() {
		return monitorContext;
	}

	public void setMonitorContext(String monitorContext) {
		this.monitorContext = monitorContext;
	}

	public Resource getResource() {
		return Resource;
	}

	public void setResource(Resource resource) {
		Resource = resource;
	}
	
	
	
}
